import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/patient/login',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/patient/register',
    method: 'post',
    data
  })
}

export function test(data) {
  return request({
    url: '/patient/selectOne',
    method: 'get'
  })
}

export function searchSomePatientPage(data) {
  return request({
    url: '/patient/searchSomePatientPage',
    method: 'post',
    data
  })
}

/**
 * 修改病人的方法
 * @param data
 * @returns
 */
export function updatePatient(data) {
  return request({
    url: '/patient/updatePatient',
    method: 'post',
    data
  })
}

/**
 * 获取所有病人列表
 */
export function selectPatientList() {
  return request({
    url: '/patient/selectPatientList',
    method: 'post'
  })
}
